package com.vodone.v1pin.productlist.vo
{
	/**
	 * 简单产品信息 
	 */	
	[Bindable]
	public class ProductItemVO
	{
		public function ProductItemVO( obj:Object = null )
		{
			if( null != obj )
			{
				parseData( obj );
			}
		}
		
		private function parseData( obj:Object ):void
		{
			if( obj.hasOwnProperty("id"))
			{
				this.productId = obj["id"];
			}
			if( obj.hasOwnProperty("Name"))
			{
				this.name = obj["Name"];
			}
			if( obj.hasOwnProperty("name"))
			{
				this.name = obj["name"];
			}
			if( obj.hasOwnProperty("mainPic"))
			{
				this.mainPic = obj["mainPic"];
			}
			if( obj.hasOwnProperty("piclist"))
			{
				if( obj["piclist"] == null )
				{
					obj["piclist"] = [];
				}
				this.picList = obj["piclist"] as Array;
				picList = [ mainPic ].concat( picList );
			}
			if( obj.hasOwnProperty("price"))
			{
				this.price = obj["price"];
			}
			if( obj.hasOwnProperty("v1pinPrice"))
			{
				this.v1pinPrice = obj["v1pinPrice"];
			}
			if( obj.hasOwnProperty("isRecommend"))
			{
				this.isRecommend = obj["isRecommend"];
			}
		}
		
		/**
		 * 商品id 
		 */		
		public var productId:String;
		/**
		 * 商品名称 
		 */		
		public var name:String;
		/**
		 * 主图地址 
		 */		
		public var mainPic:String;
		/**
		 * 图片列表 
		 */		
		public var picList:Array;
		/**
		 * 市场价 
		 */		
		public var price:Number;
		/**
		 * v1pin价 
		 */		
		public var v1pinPrice:Number;
		/**
		 * 是否是推荐商品 
		 */		
		public var isRecommend:Boolean = false;
	}
}